<div id="view-content">
    <div class="row-fluid">
        <div class="well span12">
            <form method="post" action="/search/one/search/index">
                <div class="span5">
                    <?= $this->form->searchString; ?><br>
                    <?= $this->form->from; ?>
                </div>
                <div class="span5">
                    <?= $this->form->submit; ?>          
                </div>   
            </form>
        </div>
        <div>
            <p>Found <b><?= count($this->hits) ?></b> result(s) for query <b><?= $this->query ?></b> </p>
        </div>
        <div>
            <?php
            if ($this->from == "rss") {
                ?>


                <?php foreach ($this->hits as $hit) {
                    ?>
                    <b><a href="<?= $hit->link ?>" target="_blank"><?= $hit->title ?> (score: <?= $hit->score ?>)</a></b>
                    <p>
                        <?= $hit->link ?><br>                
                        <!--Category: <?php // echo print_r($hit->category_1)  ?><br>-->
                        Description: <?= substr($hit->contents, 0, 300) . '...' ?>
                    </p>
                <?php }
                ?>

                <?php
            } else if ($this->from == "html") {
                foreach ($this->hits as $hit) {
                    ?>
                    <b><a href="<?= $hit->link ?>" target="_blank"><?= $hit->title ?> (score: <?= $hit->score ?>)</a></b>
                    <p>
                        <?= $hit->link ?>
                        <!--                    <div style="width: 50%;">
                        <?php //echo $hit->content ?>
                                            </div>-->
                    </p>
                    <hr>
                    <?
                }
            }
            ?>
        </div>
    </div>
</div>
